# PBAR_Zspec_Simulate.py

# settings
numberTrials = 100


# preliminaries
basepath = r'C:\Users\jkwong\Documents\Work\PBAR\data'
basepathMD = r'C:\Users\jkwong\Documents\Work\PBAR\dataMC'

# load zspec data

# Create list of datasets
(filenameList, fullfilenameList) = \
               PBAR_Zspec.GenerateDefaultDatasetFilenameList(basepath)

# LISTS OF DATASETS GROUPS
(datasetGroups, datasetGroupsIndices) = \
                PBAR_Zspec.GenerateDefaultDatasetGroupList(filenameList)

# list of good/bad detectors
(goodDetectorsList, badDetectorsList) = \
                    PBAR_Zspec.GenerateDefaultDetectorList()

# create simulated spectra
# loop over detectors

datMC = SimulateDataset(spectra, binsInput, binsOutput, numberTrials, t0, t)

# save spectra to file
PBAR_Zspec.CreateSimulationDataSummaryFile(filenamelistMC, \
                                           acqTimeList, datasetDescription, datasetAcquisitionTime, \
                                           datasetTime, datasetTimeNum, datasetTimeStr):
